package com.kylin.marketing.api.web.facade;

import com.kylin.marketing.api.dto.req.QueryBoardMarketingReqDTO;
import com.kylin.marketing.api.dto.resp.MarketingBoardRespDTO;
import com.kylin.shared.common.Pagination;
import com.kylin.shared.common.ResponseWrapper;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 商品营销活动接口
 * @author Damon S.
 * @version v1.0.1
 * @date 2019年10月30日 16:06
 */
@RequestMapping(value = "/api_v1/marketing", produces = MediaType.APPLICATION_JSON_VALUE)
public interface MarketingPlatformFacade {

    /**
     * 按条件查询首页营销活动上平
     * @param queryMarketingReq 查询活动商品请求参数
     * @return 返回执行结果信息
     */
    @GetMapping("/board")
    ResponseWrapper<Pagination<MarketingBoardRespDTO>> list(
            @Validated QueryBoardMarketingReqDTO queryMarketingReq
    );

    /**
     * 根据营销方案Id查询营销商品数据
     * @param campaignId 营销方案Id
     * @return 返回营销商品数据
     */
    @GetMapping("/board/{campaignId}")
    ResponseWrapper<MarketingBoardRespDTO> find(@PathVariable String campaignId);
}
